package com.kuangstudy.collection.set;

import java.util.TreeSet;

/**
 * ClassName: Demo4
 * date: 2021/07/12 20:45:44
 *
 * @author zlk
 */
public class Demo4 {
    public static void main(String[] args) {
        Student s1 = new Student("kk1", 10);
        Student s2 = new Student("kk2", 11);
        Student s3 = new Student("kk2", 11);
        Student s4 = new Student("kk3", 13);
        TreeSet<Student> students = new TreeSet<>();
        students.add(s1);
        students.add(s2);
        students.add(s3);
        students.add(s4);
        System.out.println(students);
        students.remove(new Student("kk2",11));
        System.out.println(students);

    }
}
